<%@include file="../../context.jsp"%>

<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1" />
<%@include file="../../common_imports.jsp"%>
<title>Filter List</title>
</head>
<body>
	<div class="main_wrapper">
		<div class="header_wrapper">
			<div class="container-fluid">
				<div class="header_inner_wrapper clearfix">
					<div class="row-fluid">
						<div class="header_left span4">List of company</div>
						<div class="header_right span4">
							<div class="input-append">
								<!-- search section -->
								<form:form method="POST" commandName="criteria"
									action="${pageContext.request.contextPath}/admin/filter/search.html">
									<form:select cssClass="searchSelector" path="filterCategoryId">
										<form:option value="-1">--ANY--</form:option>
										<form:options itemValue="id" itemLabel="name"
											items="${categoryMap}" />
									</form:select>
									<input class="btnSerch btn-info" type="submit">Search</input>
								</form:form>
								<!-- end of search section -->
							</div>
						</div>
					</div>
				</div>

				<div class="row-fluid">
					<div class="main_table">
						<table class="table table-bordered table-striped">
							<thead>
								<tr>
									<th>No</th>
									<th>Filter Value</th>
									<th></th>
									<th></th>
								</tr>
							</thead>
							<tbody>
								<c:forEach var="filter" items="${filterList}">
									<tr>
										<td>${filter.id}</td>
										<td>${filter.filterValues}</td>
										<td><div class="btn btn-info">
												<a
													href="${pageContext.request.contextPath}/admin/filter/edit/${filter.id}.html">Edit</a>
											</div></td>
										<td><div class="btn btn-danger">
												<a
													href="${pageContext.request.contextPath}/admin/filter/delete/${filter.id}.html">Delete</a>
											</div></td>
									</tr>
								</c:forEach>
							</tbody>
						</table>

						<!-- paging section -->
						<div class="pagination pagination-right">
							<ul>
								<li><c:if test="${filterPage.showPrev}">
										<a
											href="${pageContext.request.contextPath}/admin/filter/list.html?page=${filterPage.currentPageNo-1}&totalRecords=${filterPage.totalNoOfRecords}">Prev</a>
									</c:if></li>
								<c:forEach begin="${filterPage.startPageNo}" var="page"
									end="${filterPage.endPageNo}">
									<li><a
										<c:if test="${filterPage.currentPageNo==page}">style="background-color:#79BAEC"</c:if>
										href="${pageContext.request.contextPath}/admin/filter/list.html?page=${page}&totalRecords=${filterPage.totalNoOfRecords}">${page}</a></li>&nbsp;
							</c:forEach>
								<li><c:if test="${filterPage.showNext}">
										<a
											href="${pageContext.request.contextPath}/admin/filter/list.html?page=${filterPage.currentPageNo+1}&totalRecords=${filterPage.totalNoOfRecords}">Next</a>
									</c:if></li>
								<li><a class="pageCountLink">${filterPage.totalNoOfPages }
										Pages</a></li>
							</ul>
						</div>
						<div>
							<br></br>
						</div>
						<!-- paging section -->

						<div class="btn btn-success">
							<a
								href="${pageContext.request.contextPath}/admin/company/add.html">New</a>

						</div>
						<div class="btn btn-info">
							<a href="/StockScreener/admin/admin_home.html">Admin Home </a>
						</div>
					</div>
				</div>
			</div>
		</div>
	</div>
</body>
</html>